package com.eshopkeeper.provider.user;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.plugins.Page;
import com.eshopkeeper.core.base.BaseProvider;
import com.eshopkeeper.core.util.yunzhi.ResultDTO;
import com.eshopkeeper.model.user.UserInfo;
import com.eshopkeeper.model.user.UserInfoBean;
import com.eshopkeeper.model.user.UserProInfoBean;

/**
 * <p>
 * 用户主表
 * </p>
 *
 * @author guodong
 * @since 2017-04-20
 */
public interface IUserProvider extends BaseProvider<UserInfo> {

	public int phoneIsExisted(String userPhone);

	public UserInfo getUserByParm(Map<String, Object> map);

	public void addUser(UserInfo user);

	public void updateLastLoginTimeAndIp(Map<String, Object> paramsMap);

	UserInfoBean getUserInfo(String userSlaveId, String accountType);

	public Integer changeExtractPassword(Map<String, Object> map) throws Exception;

	List<UserProInfoBean> getSubAccList(Long userId);

	UserInfo getUser(Long userId) throws Exception;

	public int updateLogout(Map<String, Object> queryMap);

	/**
	 * 获取用户列表
	 * 
	 * @param params
	 * @return
	 */
	public Page<UserInfo> queryBeans(Map<String, Object> params);

	/**
	 * 账户管理-查询账户列表信息
	 */
	public ResultDTO<Object> queryAccountList(Map<String, Object> map) throws Exception;

	public UserProInfoBean getUserAdsInfo(Map<String, Object> queryMap);

	public UserProInfoBean getUserSupInfo(Map<String, Object> queryMap);

	public String isApplyBizRole(Long userId);

	String getAdsNameById(Long userIdS);

	public Long getUseIdM(Map<String, Object> map) throws Exception;

	/**
	 * 重置密码
	 * 
	 * @param params
	 * @return
	 */
	Integer resetPassword(Map<String, Object> params);

	/**
	 * 修改密码
	 * 
	 * @param params
	 * @return
	 */
	Map<String, Object> editPassword(Map<String, Object> params);

	public void updateLoginErrorTime(String mobile);

	List<Long> selectAdsIdByUserName(Map<String, Object> params);

	List<Long> selectSulIdByUserName(Map<String, Object> params);

	UserInfoBean getadsUserInfobyParam(Map<String, Object> params);

	UserInfoBean getsulUserInfobyParam(Map<String, Object> params);

	List<Map<String, String>> selSupplyList() throws Exception;


	/**
	 * 根据手机号修改登录密码
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	int updatePassByPhone(Map<String, Object> map) throws Exception;


}